/**
 * @param {number} n
 * @return {number}
 */

var numWays = function (n) {
    if (n === 0) {
        return 1
    }
    if (n === 1) {
        return 1
    }
    let sum = 1, pre = 1
    for (let i = 1; i < n; i++) {
        sum = sum + pre
        pre = sum - pre
        sum = sum % 1000000007
    }
    return sum
};